A = [2, 4, 3, 5, 1]
sorted_A = sorted(A)
print(sorted_A)   # 输出 [1, 2, 3, 4, 5]
print("---------")
dict_A = {"A": 1, "B": 5, "C":2, "D": 4, "E": 3}
sorted_A = dict(sorted(dict_A.items(), key=lambda x: x[1]))
print(sorted_A)
print("---------")
strings  = ["C", "C++", "python", "java",  "git"]
sorted_A = sorted(strings, key=lambda x: len(x))
print(sorted_A)
print("---------")
data  = [
    {'name': 'A', 'age': 20},
    {'name': 'B', 'age': 10},
    {'name': 'C', 'age': 13},
    {'name': 'D', 'age': 30}
    ]
sorted_A = sorted(data, key=lambda x: x['age'])
print(sorted_A)   # 
print("---------")
data  = [
    "filename01.txt",  "filename06.txt", "filename10.txt", "filename09.txt", "filename07.txt"
    ]
sorted_A = sorted(data, key=lambda x: x.split(".")[0][-2:])
print(sorted_A)
